<template>
	<view>
		<view class="title">
			<view class="item" :style="active==1?activeclass:'' " @click="Fnactive(1)">
				成功
			</view>
			<view class="item"  :style="active==0?activeclass:'' " @click="Fnactive(0)">
				待审核
			</view>
			<view class="item"  :style="active==2?activeclass:'' " @click="Fnactive(2)">
				已拒绝
			</view>
		</view>
		<view class="box" v-for="(v,i) in list">
			<view>{{v.name}}</view>
			<view class="box_word" v-if="active==1"   @click="goppdq1(v.id)">详细信息></view>
			<view class="box_word"  v-else  @click="goppdq(v.id)">详细信息></view>
	
		</view>
		<view v-if="noShuju">没有数据~</view>
	</view> 
</template>

<script>
	import {jxsInfogetSubordinateList} from "../../../api/order.js"
	export default {
		data() {
			return {
				list:[],
				active:1,
				activeclass:"color: #FF2020;",
				brandId:"",
				noShuju:false,
			}
		},
		onLoad(e) {
			this.brandId=e.brandId
			
		},
		onShow() {
			this.getData()
		},
		methods: {
			getData(){
				jxsInfogetSubordinateList({brandId:this.brandId,auditState:this.active}).then(res=>{
					if(res.status!=200){
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						})} 
					this.list=res.data
					console.log("ddd");
					console.log(res);
					if(this.list.length==0){
						this.noShuju=true
					}else{
						this.noShuju=false
					}
					
				})
			},
			Fnactive(index){
				console.log(index);
				this.active=index
				this.$forceUpdate()
				this.getData()
			},
			goppdq(id){
				this.$yrouter.push({
					path:"/pages/HzPages/dlsqView/dlsqView?id="+id
				})
			},
			goppdq1(id){
				this.$yrouter.push({
					path:"/pages/HzPages/dlview/dlview?id="+id
				})
			},
		}
	}
</script>

<style scoped lang="less">
	.title{
		width: 690upx;
		height: 100upx;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		
		
	}
	.box{
		
		width: 690upx;
		height: 70upx;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		text-align: center;
		border-bottom: 1px solid rgba(0, 0, 0, 0.1);
		margin-bottom: 30upx;
	}
	.box_word{
		font-size: 17 upx;

		color: #0000004D;
		

	}
</style>
